
import fetch from 'common/src/utils/fetch';
import baseUrl from './env';

//查询高校列表
export function getUS(data) {
    return fetch({
        url: `${baseUrl}ug/university/universities`,
        method: 'post',
        data
    })
}
//新增高校列表
export function collegeAdd(data) {
    return fetch({
        url: `${baseUrl}ug/university/add`,
        method: 'post',
        data
    })
}
//编辑高校列表
export function collegeEdit(data) {
    return fetch({
        url: `${baseUrl}ug/university/edit`,
        method: 'put',
        data
    })
}

//查询国家地区
export function getALLCollege(data) {
    return fetch({
        url: `api/commonservice/dictionary/getDictList/page/1/1000`,
        method: 'post',
        data: { "relateType": "4", "type": "G_GJQU", "remark": "国家" }
    })
}
//删除高校列表数据
export function deleteCollege(data) {
    return fetch({
        url: `${baseUrl}ug/university/delete`,
        method: 'delete',
        data
    })
}
//导入高校列表数据
export function importColleges(data) {
    return fetch({
        url: `${baseUrl}ug/university/import`,
        method: 'post',
        data
    })
}
//高校模板下载
export function downLoadTemplate() {
    window.location.href = `${baseUrl}ug/university/downloadTemplate`
}